<%= render :partial => 'account/view', :locals => {:i => @item} %>
<div style="clear:both"></div>
<%=h _("Event summary")%>
<% Gift.find(:all, :conditions => ['item_id = ?', @item.id], :select => 'event_id, count(*) as cnt', :group => 'event_id', :order => 'cnt').each do |e| %>
  <li><%=h _(e.event.name) %><%= _(" x %{count}") % {:count => e.cnt} %></li></li>
<% end %>
<%=h _("Age summary")%>
<% Gift.find(:all, :conditions => ['item_id = ?', @item.id], :select => 'age_id, count(*) as cnt', :group => 'age_id', :order => 'cnt').each do |a| %>
  <li><%=h _(a.age.name) %><%= _(" x %{count}") % {:count => a.cnt} %></li>
<% end %>
<%=h _("Presenter comment")%>
<div class="gifts">
  <% @item.gifts.each do |g| %>
    <div class="gift">
      <div class="comment"><%=h g.comment %></div>
      <dl>
	<dt><%=h _("Gender")%></dt>
	<dd><%= g.gender ? _("Boy") : _("Girl") %></dd>
	<dt><%=h _("Age")%></dt>
	<dd><%=h _(g.age.name) %></dd>
	<dt><%=h _("Event")%></dt>
	<dd><%=h _(g.event.name) %></dd>
	<dt><%=h _("Rating")%></dt>
	<dd><%= image_tag "star#{g.rating}.gif" %></dd>
      </dl>
    </div>
  <% end %>
</div>
